#ifndef _DOG_H_
#define _DOG_H_

#include <cmath>
#include <cstring>
#include <ctime>
#include <iostream>
#include <limits>
#include <queue>
#include <stack>
#include <stdio.h>
#include <termio.h>
#include <thread>
#include <vector>

#include "camera.hpp"
#include "location.hpp"
#include "motion.hpp"
#include "nlohmann/json.hpp"
#include "patrol.hpp"
#include "posinfo.hpp"
#include "slam.hpp"

class Dog {
private:
    /* 调试模式开关 */
    bool debug;

    /* GO2前置相机 */
    std::string cmdline;
    Camera cam;

    /* 位置上报+事件接收 */
    Location pos;

    /* 雷达定位 */
    Slam nav;

    /* 巡逻 */
    // Patrol pat;

    /* 运动控制 */
    Motion motion;

    /* 线程相关 */
    bool running = false;
    std::thread handle;

public:
    Dog(int debug);
    ~Dog();

    void thread();
    void start();
    void stop();
    void msleep(int ms);
};

#endif
